#include<bits/stdc++.h>

using namespace std;
using ll = long long;
#define endl '\n'

template<typename T=int>
inline T read() {
    T x;
    cin >> x;
    return x;
}

int a[10000000], c[10000000];

void merge_sort(int *a, int left, int right) {
    if (left >= right) return;
    int mid = (right + left) / 2;
    //a[left,mid]  and a[mid+1,right]
    merge_sort(a, left, mid);
    merge_sort(a, mid + 1, right);
    int i = left, j = mid + 1, k = left;
    while (i <= mid && j <= right) {
        if (a[i] <= a[j]) {
            c[k++] = a[i++];
        } else {
            c[k++] = a[j++];
        }
    }
    while (i <= mid) c[k++] = a[i++];
    while (j <= right) c[k++] = a[j++];
    copy(c + left, c + right + 1, a + left);
}



int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int n = read();
    for (int i = 0; i < n; i++)cin >> a[i];
    merge_sort(a, 0, n - 1);
    copy(a, a + n, ostream_iterator<int>(cout, " "));
    cout << endl;
    return 0;
}